/**
 * @author 0283000115
 * @date 2017年11月13日-下午2:39:50
 */
package com.zte.claa.inficombo.csa.app.model.redis;

import java.sql.Timestamp;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @author 0283000115
 *
 *	LOGID	日志ID	VARCHAR2(200)
	LOGTIME	日志生成时间戳	Timestamp
	TITLE	日志标题	VARCHAR2(100)
	FUNCTRIG	业务流程触发点	VARCHAR2(100)
	MODULE	业务对应的模块	VARCHAR2(100)
	FUNC	业务功能	VARCHAR2(100)
	RET		执行结果	Byte
	INFO	日志内容	VARCHAR2(1000)
 */
public class SysLog {
	private static final String DTFormat = "yyyy-MM-dd HH:mm:ss";
	private static final String TIME_ZONE = "GMT+8";
	public static final byte OP_RET_OK 		= 0;
	public static final byte OP_RET_FAIL 	= 1;
	public static final byte OP_RET_UNKNOWN = 2;
	
	// 日志属性
	public String logid = "";		//	日志ID	VARCHAR2(200)
	
	@JsonFormat(pattern=DTFormat, timezone = TIME_ZONE)
	private Timestamp logtime;

	public String title = "";		//	日志标题	VARCHAR2(100)
	public String functrig = "";	//	业务流程触发点	VARCHAR2(100)
	public String module = "";		//	业务对应的模块	VARCHAR2(100)
	public String func = "";		//	业务功能	VARCHAR2(100)
	public byte   ret = OP_RET_OK;	//	执行结果	Byte
	public String info = "";		//	日志内容	VARCHAR2(1000)
	
	public SysLog(){
		
	}

	public String getLogid() {
		return logid;
	}

	public void setLogid(String logid) {
		this.logid = logid;
	}

	public Timestamp getLogtime() {
		return logtime;
	}

	public void setLogtime(Timestamp logtime) {
		this.logtime = logtime;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getFunctrig() {
		return functrig;
	}

	public void setFunctrig(String functrig) {
		this.functrig = functrig;
	}

	public String getModule() {
		return module;
	}

	public void setModule(String module) {
		this.module = module;
	}

	public String getFunc() {
		return func;
	}

	public void setFunc(String func) {
		this.func = func;
	}

	public byte getRet() {
		return ret;
	}

	public void setRet(byte ret) {
		this.ret = ret;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public String toString(){
		StringBuffer b = new StringBuffer(this.logid);
		b.append(", title=").append(this.title);
		b.append(", time=").append(this.logtime);
		return b.toString();
	}
}
